package com.dxx.cloud.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dxx.cloud.admin.module.entity.GoodsEntity;
import com.dxx.cloud.admin.module.request.GoodsAddRequest;
import com.dxx.cloud.admin.module.request.GoodsListRequest;
import com.dxx.cloud.admin.module.request.GoodsPageListRequest;
import com.dxx.cloud.admin.module.response.GoodsResponse;
import org.dromara.common.mybatis.core.page.TableDataInfo;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 商品 服务类
 * </p>
 *
 * @author dh
 * @since 2025-06-06
 */
public interface IGoodsService extends IService<GoodsEntity> {
    /**
     * 查询商品列表
     * @param request
     * @return
     * @throws Exception
     */
    List<GoodsResponse> goodsList(GoodsListRequest request);

    List<GoodsEntity> listByName(String name);

    Long addGoods(GoodsAddRequest request);

    TableDataInfo<GoodsResponse> pageList(GoodsPageListRequest request);

    GoodsResponse detailResponseById(Serializable id);
}
